package com.matrix.kernel.util;

import java.util.*;

/**
 * 初始化数据数据
 *
 * @author wujiantao
 * @date 2017/7/24.
 */
public class InitDateUtils {

    /**
     * 去除收尾空格（全角半角）
     *
     * @param input
     * @return
     */
    public static String trim2(String input) {
        if (input == null || "".equals(input)) {
            return input;
        }
        int end = input.length();
        int start = 0;
        char[] val = input.toCharArray();
        while (start < end && (val[start] <= ' ' || Character.isSpaceChar(val[start]))) {
            start++;
        }
        while (start < end && (val[end - 1] <= ' ' || Character.isSpaceChar(val[end - 1]))) {
            end--;
        }
        return start > 0 || end < input.length() ? input.substring(start, end) : input;
    }

    //客户类型
    public static HashMap<String, Integer> customerType = null;
    //技术领域
    public static HashMap<String, Integer> techdomain = null;
    //专利类型
    public static HashMap<String, Integer> patentType = null;
    //任务类型
    public static HashMap<String, Integer> taskType = null;
    // 证件类型
    public static HashMap<String, String> cardTypeTable = null;
    // 申请人类型
    public static HashMap<String, String> applicantType = null;
    // 备案有效日期
    public static HashMap<String, String> recordDate = null;
    // 领域
    public static HashMap<String, String> techDomains = null;
    // 减缓
    public static HashMap<String, String> slows = null;
    // 国别
    public static HashMap<String, String> country = null;

    public static TreeMap<String, String> cpcRegion = null;

    public static TreeMap<String, String> cpcCodeRegion = null;

    static {

        techdomain = new HashMap<>();
        techdomain.put("电子", 1);
        techdomain.put("机械", 2);
        techdomain.put("生物医药", 3);
        techdomain.put("化学", 4);
        techdomain.put("计算机", 5);
        techdomain.put("其他", 6);

        taskType = new HashMap<>();
        taskType.put("分配代理人", 11);
        taskType.put("撰写", 21);
        taskType.put("递交申请", 31);
        taskType.put("等待受理", 41);
        taskType.put("缴申请费", 42);
        taskType.put("等待审查", 51);
        taskType.put("补正", 61);
        taskType.put("答复", 62);
        taskType.put("递交补正", 71);
        taskType.put("递交答复", 72);
        taskType.put("授权处理", 81);
        taskType.put("缴授权费", 82);
        taskType.put("等待证书", 83);
        taskType.put("已授权", 91);


        patentType = new HashMap<>();
        patentType.put("发明", 1);
        patentType.put("实用新型", 2);
        patentType.put("外观设计", 3);

        customerType = new HashMap<>();
        customerType.put("个人", 1);
        customerType.put("企业", 2);
        customerType.put("大专院校", 3);
        customerType.put("科研院所", 4);
        customerType.put("事业单位", 5);

        cardTypeTable = new HashMap<>();
        cardTypeTable.put("身份证", "1");
        cardTypeTable.put("护照", "2");
        cardTypeTable.put("军官证", "3");
        cardTypeTable.put("港澳台证", "4");
        cardTypeTable.put("组织机构代码证", "5");
        cardTypeTable.put("统一社会信用代码", "6");
        cardTypeTable.put("其他证件", "7");

        applicantType = new HashMap<>();
        applicantType.put("大专院校", "1");
        applicantType.put("科研单位", "2");
        applicantType.put("工矿企业", "3");
        applicantType.put("事业单位", "4");
        applicantType.put("个人", "5");

        recordDate = new HashMap<>();
        recordDate.put("2016", "2016");
        recordDate.put("2017", "2017");
        recordDate.put("2018", "2018");
        recordDate.put("2019", "2019");
        recordDate.put("2020", "2020");

        techDomains = new HashMap<>();
        techDomains.put("电子", "1");
        techDomains.put("化学", "2");
        techDomains.put("机械", "3");
        techDomains.put("计算机", "4");
        techDomains.put("生物医药", "5");

        slows = new HashMap<>();
        slows.put("减缓85%", "0.15");
        slows.put("减缓70%", "0.3");
        slows.put("无减缓", "1");

        country = new HashMap<>();
        country.put("中国", "CN");
        country.put("安道尔", "AD");
        country.put("阿联酋", "AE");
        country.put("阿富汗", "AF");
        country.put("安提瓜和巴布达", "AG");
        country.put("安圭拉岛", "AI");
        country.put("阿尔巴尼亚", "AL");
        country.put("亚美尼亚", "AM");
        country.put("荷属安的列斯", "AN");
        country.put("安哥拉", "AO");
        country.put("阿根廷", "AR");
        country.put("AP非洲工业产权组织", "ARIPO");
        country.put("奥地利", "AT");
        country.put("澳大利亚", "AU");
        country.put("阿鲁巴岛", "AW");
        country.put("阿塞拜疆", "AZ");
        country.put("波斯尼亚和黑赛哥维那", "BA");
        country.put("巴巴多斯", "BB");
        country.put("孟加拉", "BD");
        country.put("比利时", "BE");
        country.put("布基纳法索", "BF");
        country.put("保加利亚", "BG");
        country.put("巴林岛", "BH");
        country.put("布隆迪", "BI");
        country.put("贝宁", "BJ");
        country.put("百慕大群岛", "BM");
        country.put("文莱达鲁萨兰国", "BN");
        country.put("玻利维亚", "BO");
        country.put("巴西", "BR");
        country.put("巴哈马群岛", "BS");
        country.put("不丹", "BT");
        country.put("布维岛", "BV");
        country.put("博茨瓦纳", "BW");
        country.put("白俄罗斯", "BY");
        country.put("伯利兹", "BZ");
        country.put("加拿大", "CA");
        country.put("中非", "CF");
        country.put("刚果共和国", "CG");
        country.put("瑞士", "CH");
        country.put("科特迪瓦", "CI");
        country.put("库克群岛", "CK");
        country.put("智利", "CL");
        country.put("喀麦隆", "CM");
        country.put("哥伦比亚", "CO");
        country.put("哥斯达黎加", "CR");
        country.put("古巴", "CU");
        country.put("佛得角", "CV");
        country.put("塞浦路斯", "CY");
        country.put("捷克", "CZ");
        country.put("德国", "DE");
        country.put("吉布提", "DJ");
        country.put("丹麦", "DK");
        country.put("多米尼克", "DM");
        country.put("多米尼加共和国", "DO");
        country.put("阿尔及利亚", "DZ");
        country.put("欧洲专利局", "EA");
        country.put("厄瓜多尔", "EC");
        country.put("爱沙尼亚", "EE");
        country.put("埃及", "EG");
        country.put("西撒哈拉", "EH");
        country.put("厄立特里亚", "ER");
        country.put("西班牙", "ES");
        country.put("埃塞尔比亚", "ET");
        country.put("芬兰", "FI");
        country.put("斐济", "FJ");
        country.put("福克兰群岛（马尔维纳斯群岛）", "FK");
        country.put("法罗群岛", "FO");
        country.put("法国", "FR");
        country.put("加蓬", "GA");
        country.put("英国", "GB");
        country.put("格林纳达", "GD");
        country.put("格鲁吉亚", "GE");
        country.put("加纳", "GH");
        country.put("直布罗陀", "GI");
        country.put("格陵兰", "GL");
        country.put("冈比亚", "GM");
        country.put("几内亚", "GN");
        country.put("赤道几内亚", "GQ");
        country.put("希腊", "GR");
        country.put("南乔治亚岛河南桑德韦奇岛", "GS");
        country.put("危地马拉", "GT");
        country.put("几内亚比绍", "GW");
        country.put("圭亚那", "GY");
        country.put("中国香港", "HK");
        country.put("洪都拉斯", "HN");
        country.put("克罗地亚", "HR");
        country.put("海地", "HT");
        country.put("匈牙利", "HU");
        country.put("印度尼西亚", "ID");
        country.put("爱尔兰", "IE");
        country.put("以色列", "IL");
        country.put("印度", "IN");
        country.put("伊拉克", "IQ");
        country.put("伊朗", "IR");
        country.put("冰岛", "IS");
        country.put("意大利", "IT");
        country.put("牙买加", "JM");
        country.put("约旦", "JO");
        country.put("日本", "JP");
        country.put("肯尼亚", "KE");
        country.put("吉尔吉斯斯坦", "KG");
        country.put("柬埔寨", "KH");
        country.put("基里巴斯", "KI");
        country.put("科摩罗", "KM");
        country.put("圣基茨和尼维斯", "KN");
        country.put("朝鲜", "KP");
        country.put("韩国", "KR");
        country.put("科威特", "KW");
        country.put("开曼群岛", "KY");
        country.put("哈萨克斯坦", "KZ");
        country.put("老挝", "LA");
        country.put("黎巴嫩", "LB");
        country.put("圣卢西亚", "LC");
        country.put("列支敦士登", "LI");
        country.put("斯里兰卡", "LK");
        country.put("利比里亚", "LR");
        country.put("莱索托", "LS");
        country.put("立陶宛", "LT");
        country.put("卢森堡", "LU");
        country.put("拉托维亚", "LV");
        country.put("利比亚", "LY");
        country.put("摩洛哥", "MA");
        country.put("摩纳哥", "MC");
        country.put("摩尔多瓦", "MD");
        country.put("马达加斯加", "MG");
        country.put("马其顿", "MK");
        country.put("马里", "ML");
        country.put("缅甸", "MM");
        country.put("蒙古", "MN");
        country.put("澳门", "MO");
        country.put("北马里亚纳?", "MP");
        country.put("毛里塔尼亚", "MR");
        country.put("蒙特塞拉特", "MS");
        country.put("马耳他", "MT");
        country.put("毛里求斯", "MU");
        country.put("马尔代夫", "MV");
        country.put("马拉维", "MW");
        country.put("墨西哥", "MX");
        country.put("马来西亚", "MY");
        country.put("莫桑比克", "MZ");
        country.put("纳米比亚", "NA");
        country.put("尼日尔", "NE");
        country.put("尼日利亚", "NG");
        country.put("尼加拉瓜", "NI");
        country.put("荷兰", "NL");
        country.put("挪威", "NO");
        country.put("尼泊尔", "NP");
        country.put("瑙鲁", "NR");
        country.put("新西兰", "NZ");
        country.put("非洲知识产权组织", "OAPI");
        country.put("阿曼 　", "OM");
        country.put("巴拿马", "PA");
        country.put("秘鲁", "PE");
        country.put("巴布亚新几内亚", "PG");
        country.put("菲律宾", "PH");
        country.put("巴基斯坦", "PK");
        country.put("波兰", "PL");
        country.put("葡萄牙", "PT");
        country.put("帕劳群岛", "PW");
        country.put("巴拉圭", "PY");
        country.put("卡塔尔", "QA");
        country.put("罗马尼亚", "RO");
        country.put("俄罗斯联邦", "RU");
        country.put("卢旺达", "RW");
        country.put("沙特阿拉伯", "SA");
        country.put("所罗门群岛", "SB");
        country.put("塞舌尔", "SC");
        country.put("苏丹", "SD");
        country.put("瑞典", "SE");
        country.put("新加坡", "SG");
        country.put("圣赫勒拿", "SH");
        country.put("斯洛文尼亚", "SI");
        country.put("斯洛伐克", "SK");
        country.put("塞拉利昂", "SL");
        country.put("圣马力诺", "SM");
        country.put("塞内加尔", "SN");
        country.put("索马里", "SO");
        country.put("苏里南", "SR");
        country.put("圣多美和普林西比", "ST");
        country.put("萨尔瓦多", "SV");
        country.put("叙利亚", "SY ");
        country.put("斯威士兰", "SZ");
        country.put("特克斯和凯科斯群岛", "TC");
        country.put("乍得", "TD");
        country.put("多哥", "TG");
        country.put("泰国", "TH");
        country.put("塔吉克斯坦", "TJ");
        country.put("土库曼斯坦", "TM");
        country.put("突尼斯", "TN");
        country.put("汤加", "TO");
        country.put("东帝汶", "TP");
        country.put("土耳其", "TR");
        country.put("特立尼达和多巴哥", "TT");
        country.put("图瓦卢", "TV");
        country.put("中国台湾", "TW");
        country.put("坦桑尼亚", "TZ");
        country.put("乌克兰", "UA");
        country.put("乌干达", "UG");
        country.put("美国", "US");
        country.put("乌拉圭", "UY");
        country.put("乌兹别克斯坦", "UZ");
        country.put("梵蒂冈", "VA");
        country.put("圣文森特和格林纳丁斯", "VC");
        country.put("委内瑞拉", "VE");
        country.put("维尔京群岛", "VG");
        country.put("越南", "VN");
        country.put("瓦努阿图", "VU");
        country.put("世界知识产权组织国际局", "WO");
        country.put("萨摩亚", "WS");
        country.put("也门", "YE");
        country.put("南斯拉夫", "YU");
        country.put("南非", "ZA");
        country.put("赞比亚", "ZM");
        country.put("津巴布韦", "ZW");

        cpcRegion = new TreeMap<>();
        cpcRegion.put("北京市", "110000");
        cpcRegion.put("北京市东城", "110101");
        cpcRegion.put("北京市西城", "110102");
        cpcRegion.put("北京市崇文", "110103");
        cpcRegion.put("北京市宣武", "110104");
        cpcRegion.put("北京市朝阳", "110105");
        cpcRegion.put("北京市丰台", "110106");
        cpcRegion.put("北京市石景山", "110107");
        cpcRegion.put("北京市海淀", "110108");
        cpcRegion.put("北京市门头沟", "110109");
        cpcRegion.put("北京市房山", "110111");
        cpcRegion.put("北京市通州", "110112");
        cpcRegion.put("北京市顺义", "110113");
        cpcRegion.put("北京市昌平", "110114");
        cpcRegion.put("北京市大兴", "110115");
        cpcRegion.put("北京市怀柔", "110116");
        cpcRegion.put("北京市平谷", "110117");
        cpcRegion.put("北京市密云", "110228");
        cpcRegion.put("北京市延庆", "110229");

        cpcRegion.put("天津市", "120000");
        cpcRegion.put("天津市和平", "120101");
        cpcRegion.put("天津市河东", "120102");
        cpcRegion.put("天津市河西", "120103");
        cpcRegion.put("天津市南开", "120104");
        cpcRegion.put("天津市河北", "120105");
        cpcRegion.put("天津市红桥", "120106");
        cpcRegion.put("天津市塘沽", "120107");
        cpcRegion.put("天津市汉沽", "120108");
        cpcRegion.put("天津市大港", "120109");
        cpcRegion.put("天津市东丽", "120110");
        cpcRegion.put("天津市西青", "120111");
        cpcRegion.put("天津市津南", "120112");
        cpcRegion.put("天津市北辰", "120113");
        cpcRegion.put("天津市武清", "120114");
        cpcRegion.put("天津市宝坻", "120115");
        cpcRegion.put("天津市滨海", "120116");
        cpcRegion.put("天津市宁河", "120221");
        cpcRegion.put("天津市静海", "120223");
        cpcRegion.put("天津市蓟", "120225");

        cpcRegion.put("河北省", "130000");
        cpcRegion.put("河北省石家庄", "130100");
        cpcRegion.put("河北省唐山", "130200");
        cpcRegion.put("河北省秦皇岛", "130300");
        cpcRegion.put("河北省邯郸", "130400");
        cpcRegion.put("河北省邢台", "130500");
        cpcRegion.put("河北省保定", "130600");
        cpcRegion.put("河北省张家口", "130700");
        cpcRegion.put("河北省承德", "130800");
        cpcRegion.put("河北省沧州", "130900");
        cpcRegion.put("河北省廊坊", "131000");
        cpcRegion.put("河北省衡水", "131100");

        cpcRegion.put("山西省", "140000");
        cpcRegion.put("山西省太原", "140100");
        cpcRegion.put("山西省大同", "140200");
        cpcRegion.put("山西省阳泉", "140300");
        cpcRegion.put("山西省长治", "140400");
        cpcRegion.put("山西省晋城", "140500");
        cpcRegion.put("山西省朔州", "140600");
        cpcRegion.put("山西省晋中", "140700");
        cpcRegion.put("山西省运城", "140800");
        cpcRegion.put("山西省忻州", "140900");
        cpcRegion.put("山西省临汾", "141000");
        cpcRegion.put("山西省吕梁", "141100");

        cpcRegion.put("内蒙古", "150000");
        cpcRegion.put("内蒙古呼和浩特", "150100");
        cpcRegion.put("内蒙古包头", "150200");
        cpcRegion.put("内蒙古乌海", "150300");
        cpcRegion.put("内蒙古赤峰", "150400");
        cpcRegion.put("内蒙古通辽", "150500");
        cpcRegion.put("内蒙古鄂尔多斯", "150600");
        cpcRegion.put("内蒙古呼伦贝尔", "150700");
        cpcRegion.put("内蒙古巴彦淖尔", "150800");
        cpcRegion.put("内蒙古乌兰察布", "150900");
        cpcRegion.put("内蒙古兴安", "152200");
        cpcRegion.put("内蒙古锡林郭勒", "152500");
        cpcRegion.put("内蒙古阿拉善", "152900");

        cpcRegion.put("辽宁省", "210000");
        cpcRegion.put("辽宁省沈阳", "210100");
        cpcRegion.put("辽宁省大连", "210200");
        cpcRegion.put("辽宁省鞍山", "210300");
        cpcRegion.put("辽宁省抚顺", "210400");
        cpcRegion.put("辽宁省本溪", "210500");
        cpcRegion.put("辽宁省丹东", "210600");
        cpcRegion.put("辽宁省锦州", "210700");
        cpcRegion.put("辽宁省营口", "210800");
        cpcRegion.put("辽宁省阜新", "210900");
        cpcRegion.put("辽宁省辽阳", "211000");
        cpcRegion.put("辽宁省盘锦", "211100");
        cpcRegion.put("辽宁省铁岭", "211200");
        cpcRegion.put("辽宁省朝阳", "211300");
        cpcRegion.put("辽宁省葫芦岛", "211400");

        cpcRegion.put("吉林省", "220000");
        cpcRegion.put("吉林省长春", "220100");
        cpcRegion.put("吉林省吉林", "220200");
        cpcRegion.put("吉林省四平", "220300");
        cpcRegion.put("吉林省辽源", "220400");
        cpcRegion.put("吉林省通化", "220500");
        cpcRegion.put("吉林省白山", "220600");
        cpcRegion.put("吉林省松原", "220700");
        cpcRegion.put("吉林省白城", "220800");
        cpcRegion.put("吉林省延边", "222400");

        cpcRegion.put("黑龙江省", "230000");
        cpcRegion.put("黑龙江省哈尔滨", "230100");
        cpcRegion.put("黑龙江省齐齐哈尔", "230200");
        cpcRegion.put("黑龙江省鸡西", "230300");
        cpcRegion.put("黑龙江省鹤岗", "230400");
        cpcRegion.put("黑龙江省双鸭山", "230500");
        cpcRegion.put("黑龙江省大庆", "230600");
        cpcRegion.put("黑龙江省伊春", "230700");
        cpcRegion.put("黑龙江省佳木斯", "230800");
        cpcRegion.put("黑龙江省七台河", "230900");
        cpcRegion.put("黑龙江省牡丹江", "231000");
        cpcRegion.put("黑龙江省黑河", "231100");
        cpcRegion.put("黑龙江省绥化", "231200");
        cpcRegion.put("黑龙江省大兴安岭", "232700");

        cpcRegion.put("上海市", "310000");
        cpcRegion.put("上海市黄浦", "310101");
        cpcRegion.put("上海市卢湾", "310103");
        cpcRegion.put("上海市徐汇", "310104");
        cpcRegion.put("上海市长宁", "310105");
        cpcRegion.put("上海市静安", "310106");
        cpcRegion.put("上海市普陀", "310107");
        cpcRegion.put("上海市闸北", "310108");
        cpcRegion.put("上海市虹口", "310109");
        cpcRegion.put("上海市杨浦", "310110");
        cpcRegion.put("上海市闵行", "310112");
        cpcRegion.put("上海市宝山", "310113");
        cpcRegion.put("上海市嘉定", "310114");
        cpcRegion.put("上海市浦东", "310115");
        cpcRegion.put("上海市金山", "310116");
        cpcRegion.put("上海市松江", "310117");
        cpcRegion.put("上海市青浦", "310118");
        cpcRegion.put("上海市南汇", "310119");
        cpcRegion.put("上海市奉贤", "310120");
        cpcRegion.put("上海市崇明", "310230");

        cpcRegion.put("江苏省", "320000");
        cpcRegion.put("江苏省南京", "320100");
        cpcRegion.put("江苏省无锡", "320200");
        cpcRegion.put("江苏省徐州", "320300");
        cpcRegion.put("江苏省常州", "320400");
        cpcRegion.put("江苏省苏州", "320500");
        cpcRegion.put("江苏省南通", "320600");
        cpcRegion.put("江苏省连云港", "320700");
        cpcRegion.put("江苏省淮安", "320800");
        cpcRegion.put("江苏省盐城", "320900");
        cpcRegion.put("江苏省扬州", "321000");
        cpcRegion.put("江苏省镇江", "321100");
        cpcRegion.put("江苏省泰州", "321200");
        cpcRegion.put("江苏省宿迁", "321300");

        cpcRegion.put("浙江省", "330000");
        cpcRegion.put("浙江省杭州", "330100");
        cpcRegion.put("浙江省宁波", "330200");
        cpcRegion.put("浙江省温州", "330300");
        cpcRegion.put("浙江省嘉兴", "330400");
        cpcRegion.put("浙江省湖州", "330500");
        cpcRegion.put("浙江省绍兴", "330600");
        cpcRegion.put("浙江省金华", "330700");
        cpcRegion.put("浙江省衢州", "330800");
        cpcRegion.put("浙江省舟山", "330900");
        cpcRegion.put("浙江省台州", "331000");
        cpcRegion.put("浙江省丽水", "331100");

        cpcRegion.put("安徽省", "340000");
        cpcRegion.put("安徽省合肥", "340100");
        cpcRegion.put("安徽省芜湖", "340200");
        cpcRegion.put("安徽省蚌埠", "340300");
        cpcRegion.put("安徽省淮南", "340400");
        cpcRegion.put("安徽省马鞍山", "340500");
        cpcRegion.put("安徽省淮北", "340600");
        cpcRegion.put("安徽省铜陵", "340700");
        cpcRegion.put("安徽省安庆", "340800");
        cpcRegion.put("安徽省黄山", "341000");
        cpcRegion.put("安徽省滁州", "341100");
        cpcRegion.put("安徽省阜阳", "341200");
        cpcRegion.put("安徽省宿州", "341300");
        cpcRegion.put("安徽省巢湖", "341400");
        cpcRegion.put("安徽省六安", "341500");
        cpcRegion.put("安徽省亳州", "341600");
        cpcRegion.put("安徽省池州", "341700");
        cpcRegion.put("安徽省宣城", "341800");

        cpcRegion.put("福建省", "350000");
        cpcRegion.put("福建省福州", "350100");
        cpcRegion.put("福建省厦门", "350200");
        cpcRegion.put("福建省莆田", "350300");
        cpcRegion.put("福建省三明", "350400");
        cpcRegion.put("福建省泉州", "350500");
        cpcRegion.put("福建省漳州", "350600");
        cpcRegion.put("福建省南平", "350700");
        cpcRegion.put("福建省龙岩", "350800");
        cpcRegion.put("福建省宁德", "350900");

        cpcRegion.put("江西省", "360000");
        cpcRegion.put("江西省南昌", "360100");
        cpcRegion.put("江西省景德镇", "360200");
        cpcRegion.put("江西省萍乡", "360300");
        cpcRegion.put("江西省九江", "360400");
        cpcRegion.put("江西省新余", "360500");
        cpcRegion.put("江西省鹰潭", "360600");
        cpcRegion.put("江西省赣州", "360700");
        cpcRegion.put("江西省吉安", "360800");
        cpcRegion.put("江西省宜春", "360900");
        cpcRegion.put("江西省抚州", "361000");
        cpcRegion.put("江西省上饶", "361100");

        cpcRegion.put("山东省", "370000");
        cpcRegion.put("山东省济南", "370100");
        cpcRegion.put("山东省青岛", "370200");
        cpcRegion.put("山东省淄博", "370300");
        cpcRegion.put("山东省枣庄", "370400");
        cpcRegion.put("山东省东营", "370500");
        cpcRegion.put("山东省烟台", "370600");
        cpcRegion.put("山东省潍坊", "370700");
        cpcRegion.put("山东省济宁", "370800");
        cpcRegion.put("山东省泰安", "370900");
        cpcRegion.put("山东省威海", "371000");
        cpcRegion.put("山东省日照", "371100");
        cpcRegion.put("山东省莱芜", "371200");
        cpcRegion.put("山东省临沂", "371300");
        cpcRegion.put("山东省德州", "371400");
        cpcRegion.put("山东省聊城", "371500");
        cpcRegion.put("山东省滨州", "371600");
        cpcRegion.put("山东省菏泽", "371700");

        cpcRegion.put("河南省", "410000");
        cpcRegion.put("河南省郑州", "410100");
        cpcRegion.put("河南省开封", "410200");
        cpcRegion.put("河南省洛阳", "410300");
        cpcRegion.put("河南省平顶山", "410400");
        cpcRegion.put("河南省安阳", "410500");
        cpcRegion.put("河南省鹤壁", "410600");
        cpcRegion.put("河南省新乡", "410700");
        cpcRegion.put("河南省焦作", "410800");
        cpcRegion.put("河南省濮阳", "410900");
        cpcRegion.put("河南省许昌", "411000");
        cpcRegion.put("河南省漯河", "411100");
        cpcRegion.put("河南省三门峡", "411200");
        cpcRegion.put("河南省南阳", "411300");
        cpcRegion.put("河南省商丘", "411400");
        cpcRegion.put("河南省信阳", "411500");
        cpcRegion.put("河南省周口", "411600");
        cpcRegion.put("河南省驻马店", "411700");

        cpcRegion.put("湖北省", "420000");
        cpcRegion.put("湖北省武汉", "420100");
        cpcRegion.put("湖北省黄石", "420200");
        cpcRegion.put("湖北省十堰", "420300");
        cpcRegion.put("湖北省宜昌", "420500");
        cpcRegion.put("湖北省襄樊", "420600");
        cpcRegion.put("湖北省鄂州", "420700");
        cpcRegion.put("湖北省荆门", "420800");
        cpcRegion.put("湖北省孝感", "420900");
        cpcRegion.put("湖北省荆州", "421000");
        cpcRegion.put("湖北省黄冈", "421100");
        cpcRegion.put("湖北省咸宁", "421200");
        cpcRegion.put("湖北省随州", "421300");
        cpcRegion.put("湖北省恩施", "422800");
        cpcRegion.put("湖北省省直辖行政单位", "429000");

        cpcRegion.put("湖南省", "430000");
        cpcRegion.put("湖南省长沙", "430100");
        cpcRegion.put("湖南省株洲", "430200");
        cpcRegion.put("湖南省湘潭", "430300");
        cpcRegion.put("湖南省衡阳", "430400");
        cpcRegion.put("湖南省邵阳", "430500");
        cpcRegion.put("湖南省岳阳", "430600");
        cpcRegion.put("湖南省常德", "430700");
        cpcRegion.put("湖南省张家界", "430800");
        cpcRegion.put("湖南省益阳", "430900");
        cpcRegion.put("湖南省郴州", "431000");
        cpcRegion.put("湖南省永州", "431100");
        cpcRegion.put("湖南省怀化", "431200");
        cpcRegion.put("湖南省娄底", "431300");
        cpcRegion.put("湖南省湘西", "433100");

        cpcRegion.put("广东省", "440000");
        cpcRegion.put("广东省广州", "440100");
        cpcRegion.put("广东省韶关", "440200");
        cpcRegion.put("广东省深圳", "440300");
        cpcRegion.put("广东省珠海", "440400");
        cpcRegion.put("广东省汕头", "440500");
        cpcRegion.put("广东省佛山", "440600");
        cpcRegion.put("广东省江门", "440700");
        cpcRegion.put("广东省湛江", "440800");
        cpcRegion.put("广东省茂名", "440900");
        cpcRegion.put("广东省肇庆", "441200");
        cpcRegion.put("广东省惠州", "441300");
        cpcRegion.put("广东省梅州", "441400");
        cpcRegion.put("广东省汕尾", "441500");
        cpcRegion.put("广东省河源", "441600");
        cpcRegion.put("广东省阳江", "441700");
        cpcRegion.put("广东省清远", "441800");
        cpcRegion.put("广东省东莞", "441900");
        cpcRegion.put("广东省中山", "442000");
        cpcRegion.put("广东省潮州", "445100");
        cpcRegion.put("广东省揭阳", "445200");
        cpcRegion.put("广东省云浮", "445300");

        cpcRegion.put("广西", "450000");
        cpcRegion.put("广西南宁", "450100");
        cpcRegion.put("广西柳州", "450200");
        cpcRegion.put("广西桂林", "450300");
        cpcRegion.put("广西梧州", "450400");
        cpcRegion.put("广西北海", "450500");
        cpcRegion.put("广西防城港", "450600");
        cpcRegion.put("广西钦州", "450700");
        cpcRegion.put("广西贵港", "450800");
        cpcRegion.put("广西玉林", "450900");
        cpcRegion.put("广西百色", "451000");
        cpcRegion.put("广西贺州", "451100");
        cpcRegion.put("广西河池", "451200");
        cpcRegion.put("广西来宾", "451300");
        cpcRegion.put("广西崇左", "451400");

        cpcRegion.put("海南省", "460000");
        cpcRegion.put("海南省海口", "460100");
        cpcRegion.put("海南省三亚", "460200");
        cpcRegion.put("海南省省直辖县级行政单位", "469000");

        cpcRegion.put("重庆市", "500000");
        cpcRegion.put("重庆市万州", "500101");
        cpcRegion.put("重庆市涪陵", "500102");
        cpcRegion.put("重庆市渝中", "500103");
        cpcRegion.put("重庆市大渡口", "500104");
        cpcRegion.put("重庆市江北", "500105");
        cpcRegion.put("重庆市沙坪坝", "500106");
        cpcRegion.put("重庆市九龙坡", "500107");
        cpcRegion.put("重庆市南岸", "500108");
        cpcRegion.put("重庆市北碚", "500109");
        cpcRegion.put("重庆市万盛", "500110");
        cpcRegion.put("重庆市双桥", "500111");
        cpcRegion.put("重庆市渝北", "500112");
        cpcRegion.put("重庆市巴南", "500113");
        cpcRegion.put("重庆市黔江", "500114");
        cpcRegion.put("重庆市长寿", "500115");
        cpcRegion.put("重庆市綦江", "500222");
        cpcRegion.put("重庆市潼南", "500223");
        cpcRegion.put("重庆市铜梁", "500224");
        cpcRegion.put("重庆市大足", "500225");
        cpcRegion.put("重庆市荣昌", "500226");
        cpcRegion.put("重庆市壁山", "500227");
        cpcRegion.put("重庆市梁平", "500228");
        cpcRegion.put("重庆市城口", "500229");
        cpcRegion.put("重庆市丰都", "500230");
        cpcRegion.put("重庆市垫江", "500231");
        cpcRegion.put("重庆市武隆", "500232");
        cpcRegion.put("重庆市忠", "500233");
        cpcRegion.put("重庆市开", "500234");
        cpcRegion.put("重庆市云阳", "500235");
        cpcRegion.put("重庆市奉节", "500236");
        cpcRegion.put("重庆市巫山", "500237");
        cpcRegion.put("重庆市巫溪", "500238");
        cpcRegion.put("重庆市石柱", "500240");
        cpcRegion.put("重庆市秀山", "500241");
        cpcRegion.put("重庆市酉阳", "500242");
        cpcRegion.put("重庆市彭水", "500243");

        cpcRegion.put("四川省", "510000");
        cpcRegion.put("四川省成都", "510100");
        cpcRegion.put("四川省自贡", "510300");
        cpcRegion.put("四川省攀枝花", "510400");
        cpcRegion.put("四川省泸州", "510500");
        cpcRegion.put("四川省德阳", "510600");
        cpcRegion.put("四川省绵阳", "510700");
        cpcRegion.put("四川省广元", "510800");
        cpcRegion.put("四川省遂宁", "510900");
        cpcRegion.put("四川省内江", "511000");
        cpcRegion.put("四川省乐山", "511100");
        cpcRegion.put("四川省南充", "511300");
        cpcRegion.put("四川省眉山", "511400");
        cpcRegion.put("四川省宜宾", "511500");
        cpcRegion.put("四川省广安", "511600");
        cpcRegion.put("四川省达州", "511700");
        cpcRegion.put("四川省雅安", "511800");
        cpcRegion.put("四川省巴中", "511900");
        cpcRegion.put("四川省资阳", "512000");
        cpcRegion.put("四川省阿坝", "513200");
        cpcRegion.put("四川省甘孜", "513300");
        cpcRegion.put("四川省凉山", "513400");

        cpcRegion.put("贵州省", "520000");
        cpcRegion.put("贵州省贵阳", "520100");
        cpcRegion.put("贵州省六盘水", "520200");
        cpcRegion.put("贵州省遵义", "520300");
        cpcRegion.put("贵州省安顺", "520400");
        cpcRegion.put("贵州省铜仁", "522200");
        cpcRegion.put("贵州省黔西南", "522300");
        cpcRegion.put("贵州省毕节", "522400");
        cpcRegion.put("贵州省黔东南", "522600");
        cpcRegion.put("贵州省黔南", "522700");

        cpcRegion.put("云南省", "530000");
        cpcRegion.put("云南省昆明", "530100");
        cpcRegion.put("云南省曲靖", "530300");
        cpcRegion.put("云南省玉溪", "530400");
        cpcRegion.put("云南省保山", "530500");
        cpcRegion.put("云南省昭通", "530600");
        cpcRegion.put("云南省丽江", "530700");
        cpcRegion.put("云南省思茅", "530800");
        cpcRegion.put("云南省临沧", "530900");
        cpcRegion.put("云南省楚雄", "532300");
        cpcRegion.put("云南省红河", "532500");
        cpcRegion.put("云南省文山", "532600");
        cpcRegion.put("云南省西双版纳", "532800");
        cpcRegion.put("云南省大理", "532900");
        cpcRegion.put("云南省德宏", "533100");
        cpcRegion.put("云南省怒江", "533300");
        cpcRegion.put("云南省迪庆", "533400");

        cpcRegion.put("西藏", "540000");
        cpcRegion.put("西藏拉萨", "540100");
        cpcRegion.put("西藏昌都", "542100");
        cpcRegion.put("西藏山南", "542200");
        cpcRegion.put("西藏日喀则", "542300");
        cpcRegion.put("西藏那曲", "542400");
        cpcRegion.put("西藏阿里", "542500");
        cpcRegion.put("西藏林芝", "542600");

        cpcRegion.put("陕西省", "610000");
        cpcRegion.put("陕西省西安", "610100");
        cpcRegion.put("陕西省铜川", "610200");
        cpcRegion.put("陕西省宝鸡", "610300");
        cpcRegion.put("陕西省咸阳", "610400");
        cpcRegion.put("陕西省渭南", "610500");
        cpcRegion.put("陕西省延安", "610600");
        cpcRegion.put("陕西省汉中", "610700");
        cpcRegion.put("陕西省榆林", "610800");
        cpcRegion.put("陕西省安康", "610900");
        cpcRegion.put("陕西省商洛", "611000");

        cpcRegion.put("甘肃省", "620000");
        cpcRegion.put("甘肃省兰州", "620100");
        cpcRegion.put("甘肃省嘉峪关", "620200");
        cpcRegion.put("甘肃省金昌", "620300");
        cpcRegion.put("甘肃省白银", "620400");
        cpcRegion.put("甘肃省天水", "620500");
        cpcRegion.put("甘肃省武威", "620600");
        cpcRegion.put("甘肃省张掖", "620700");
        cpcRegion.put("甘肃省平凉", "620800");
        cpcRegion.put("甘肃省酒泉", "620900");
        cpcRegion.put("甘肃省庆阳", "621000");
        cpcRegion.put("甘肃省定西", "621100");
        cpcRegion.put("甘肃省陇南", "621200");
        cpcRegion.put("甘肃省临夏", "622900");
        cpcRegion.put("甘肃省甘南", "623000");

        cpcRegion.put("青海省", "630000");
        cpcRegion.put("青海省西宁", "630100");
        cpcRegion.put("青海省海东", "632100");
        cpcRegion.put("青海省海北", "632200");
        cpcRegion.put("青海省黄南", "632300");
        cpcRegion.put("青海省海南", "632500");
        cpcRegion.put("青海省果洛", "632600");
        cpcRegion.put("青海省玉树", "632700");
        cpcRegion.put("青海省海西", "632800");

        cpcRegion.put("宁夏", "640000");
        cpcRegion.put("宁夏银川", "640100");
        cpcRegion.put("宁夏石嘴山", "640200");
        cpcRegion.put("宁夏吴忠", "640300");
        cpcRegion.put("宁夏固原", "640400");
        cpcRegion.put("宁夏中卫", "640500");

        cpcRegion.put("新疆", "650000");
        cpcRegion.put("新疆乌鲁木齐", "650100");
        cpcRegion.put("新疆克拉玛依", "650200");
        cpcRegion.put("新疆吐鲁番", "652100");
        cpcRegion.put("新疆哈密", "652200");
        cpcRegion.put("新疆昌吉", "652300");
        cpcRegion.put("新疆博尔塔拉", "652700");
        cpcRegion.put("新疆巴音郭楞", "652800");
        cpcRegion.put("新疆阿克苏", "652900");
        cpcRegion.put("新疆克孜勒苏", "653000");
        cpcRegion.put("新疆喀什", "653100");
        cpcRegion.put("新疆和田", "653200");
        cpcRegion.put("新疆伊犁", "654000");
        cpcRegion.put("新疆塔城", "654200");
        cpcRegion.put("新疆阿勒泰", "654300");
        cpcRegion.put("新疆省直辖行政单位", "659000");

        cpcRegion.put("台湾省", "710000");

        cpcRegion.put("香港", "810000");

        cpcRegion.put("澳门", "910000");

        cpcCodeRegion = new TreeMap<>();
        cpcCodeRegion.put("110000", "北京市");
        cpcCodeRegion.put("110101", "东城区");
        cpcCodeRegion.put("110102", "西城区");
        cpcCodeRegion.put("110103", "崇文区");
        cpcCodeRegion.put("110104", "宣武区");
        cpcCodeRegion.put("110105", "朝阳区");
        cpcCodeRegion.put("110106", "丰台区");
        cpcCodeRegion.put("110107", "石景山区");
        cpcCodeRegion.put("110108", "海淀区");
        cpcCodeRegion.put("110109", "门头沟区");
        cpcCodeRegion.put("110111", "房山区");
        cpcCodeRegion.put("110112", "通州区");
        cpcCodeRegion.put("110113", "顺义区");
        cpcCodeRegion.put("110114", "昌平区");
        cpcCodeRegion.put("110115", "大兴区");
        cpcCodeRegion.put("110116", "怀柔区");
        cpcCodeRegion.put("110117", "平谷区");
        cpcCodeRegion.put("110228", "密云县");
        cpcCodeRegion.put("110229", "延庆县");
        cpcCodeRegion.put("120000", "天津市");
        cpcCodeRegion.put("120101", "和平区");
        cpcCodeRegion.put("120102", "河东区");
        cpcCodeRegion.put("120103", "河西区");
        cpcCodeRegion.put("120104", "南开区");
        cpcCodeRegion.put("120105", "河北区");
        cpcCodeRegion.put("120106", "红桥区");
        cpcCodeRegion.put("120107", "塘沽区");
        cpcCodeRegion.put("120108", "汉沽区");
        cpcCodeRegion.put("120109", "大港区");
        cpcCodeRegion.put("120110", "东丽区");
        cpcCodeRegion.put("120111", "西青区");
        cpcCodeRegion.put("120112", "津南区");
        cpcCodeRegion.put("120113", "北辰区");
        cpcCodeRegion.put("120114", "武清区");
        cpcCodeRegion.put("120115", "宝坻区");
        cpcCodeRegion.put("120116", "滨海新区");
        cpcCodeRegion.put("120221", "宁河县");
        cpcCodeRegion.put("120223", "静海县");
        cpcCodeRegion.put("120225", "蓟县");
        cpcCodeRegion.put("130000", "河北省");
        cpcCodeRegion.put("130100", "石家庄市");
        cpcCodeRegion.put("130200", "唐山市");
        cpcCodeRegion.put("130300", "秦皇岛市");
        cpcCodeRegion.put("130400", "邯郸市");
        cpcCodeRegion.put("130500", "邢台市");
        cpcCodeRegion.put("130600", "保定市");
        cpcCodeRegion.put("130700", "张家口市");
        cpcCodeRegion.put("130800", "承德市");
        cpcCodeRegion.put("130900", "沧州市");
        cpcCodeRegion.put("131000", "廊坊市");
        cpcCodeRegion.put("131100", "衡水市");
        cpcCodeRegion.put("140000", "山西省");
        cpcCodeRegion.put("140100", "太原市");
        cpcCodeRegion.put("140200", "大同市");
        cpcCodeRegion.put("140300", "阳泉市");
        cpcCodeRegion.put("140400", "长治市");
        cpcCodeRegion.put("140500", "晋城市");
        cpcCodeRegion.put("140600", "朔州市");
        cpcCodeRegion.put("140700", "晋中市");
        cpcCodeRegion.put("140800", "运城市");
        cpcCodeRegion.put("140900", "忻州市");
        cpcCodeRegion.put("141000", "临汾市");
        cpcCodeRegion.put("141100", "吕梁市");
        cpcCodeRegion.put("150000", "内蒙古自治区");
        cpcCodeRegion.put("150100", "呼和浩特市");
        cpcCodeRegion.put("150200", "包头市");
        cpcCodeRegion.put("150300", "乌海市");
        cpcCodeRegion.put("150400", "赤峰市");
        cpcCodeRegion.put("150500", "通辽市");
        cpcCodeRegion.put("150600", "鄂尔多斯市");
        cpcCodeRegion.put("150700", "呼伦贝尔市");
        cpcCodeRegion.put("150800", "巴彦淖尔市");
        cpcCodeRegion.put("150900", "乌兰察布市");
        cpcCodeRegion.put("152200", "兴安盟");
        cpcCodeRegion.put("152500", "锡林郭勒盟");
        cpcCodeRegion.put("152900", "阿拉善盟");
        cpcCodeRegion.put("210000", "辽宁省");
        cpcCodeRegion.put("210100", "沈阳市");
        cpcCodeRegion.put("210200", "大连市");
        cpcCodeRegion.put("210300", "鞍山市");
        cpcCodeRegion.put("210400", "抚顺市");
        cpcCodeRegion.put("210500", "本溪市");
        cpcCodeRegion.put("210600", "丹东市");
        cpcCodeRegion.put("210700", "锦州市");
        cpcCodeRegion.put("210800", "营口市");
        cpcCodeRegion.put("210900", "阜新市");
        cpcCodeRegion.put("211000", "辽阳市");
        cpcCodeRegion.put("211100", "盘锦市");
        cpcCodeRegion.put("211200", "铁岭市");
        cpcCodeRegion.put("211300", "朝阳市");
        cpcCodeRegion.put("211400", "葫芦岛市");
        cpcCodeRegion.put("220000", "吉林省");
        cpcCodeRegion.put("220100", "长春市");
        cpcCodeRegion.put("220200", "吉林市");
        cpcCodeRegion.put("220300", "四平市");
        cpcCodeRegion.put("220400", "辽源市");
        cpcCodeRegion.put("220500", "通化市");
        cpcCodeRegion.put("220600", "白山市");
        cpcCodeRegion.put("220700", "松原市");
        cpcCodeRegion.put("220800", "白城市");
        cpcCodeRegion.put("222400", "延边朝鲜族自治州");
        cpcCodeRegion.put("230000", "黑龙江省");
        cpcCodeRegion.put("230100", "哈尔滨市");
        cpcCodeRegion.put("230200", "齐齐哈尔市");
        cpcCodeRegion.put("230300", "鸡西市");
        cpcCodeRegion.put("230400", "鹤岗市");
        cpcCodeRegion.put("230500", "双鸭山市");
        cpcCodeRegion.put("230600", "大庆市");
        cpcCodeRegion.put("230700", "伊春市");
        cpcCodeRegion.put("230800", "佳木斯市");
        cpcCodeRegion.put("230900", "七台河市");
        cpcCodeRegion.put("231000", "牡丹江市");
        cpcCodeRegion.put("231100", "黑河市");
        cpcCodeRegion.put("231200", "绥化市");
        cpcCodeRegion.put("232700", "大兴安岭地区");
        cpcCodeRegion.put("310000", "上海市");
        cpcCodeRegion.put("310101", "黄浦区");
        cpcCodeRegion.put("310103", "卢湾区");
        cpcCodeRegion.put("310104", "徐汇区");
        cpcCodeRegion.put("310105", "长宁区");
        cpcCodeRegion.put("310106", "静安区");
        cpcCodeRegion.put("310107", "普陀区");
        cpcCodeRegion.put("310108", "闸北区");
        cpcCodeRegion.put("310109", "虹口区");
        cpcCodeRegion.put("310110", "杨浦区");
        cpcCodeRegion.put("310112", "闵行区");
        cpcCodeRegion.put("310113", "宝山区");
        cpcCodeRegion.put("310114", "嘉定区");
        cpcCodeRegion.put("310115", "浦东新区");
        cpcCodeRegion.put("310116", "金山区");
        cpcCodeRegion.put("310117", "松江区");
        cpcCodeRegion.put("310118", "青浦区");
        cpcCodeRegion.put("310119", "南汇区");
        cpcCodeRegion.put("310120", "奉贤区");
        cpcCodeRegion.put("310230", "崇明县");
        cpcCodeRegion.put("320000", "江苏省");
        cpcCodeRegion.put("320100", "南京市");
        cpcCodeRegion.put("320200", "无锡市");
        cpcCodeRegion.put("320300", "徐州市");
        cpcCodeRegion.put("320400", "常州市");
        cpcCodeRegion.put("320500", "苏州市");
        cpcCodeRegion.put("320600", "南通市");
        cpcCodeRegion.put("320700", "连云港市");
        cpcCodeRegion.put("320800", "淮安市");
        cpcCodeRegion.put("320900", "盐城市");
        cpcCodeRegion.put("321000", "扬州市");
        cpcCodeRegion.put("321100", "镇江市");
        cpcCodeRegion.put("321200", "泰州市");
        cpcCodeRegion.put("321300", "宿迁市");
        cpcCodeRegion.put("330000", "浙江省");
        cpcCodeRegion.put("330100", "杭州市");
        cpcCodeRegion.put("330200", "宁波市");
        cpcCodeRegion.put("330300", "温州市");
        cpcCodeRegion.put("330400", "嘉兴市");
        cpcCodeRegion.put("330500", "湖州市");
        cpcCodeRegion.put("330600", "绍兴市");
        cpcCodeRegion.put("330700", "金华市");
        cpcCodeRegion.put("330800", "衢州市");
        cpcCodeRegion.put("330900", "舟山市");
        cpcCodeRegion.put("331000", "台州市");
        cpcCodeRegion.put("331100", "丽水市");
        cpcCodeRegion.put("340000", "安徽省");
        cpcCodeRegion.put("340100", "合肥市");
        cpcCodeRegion.put("340200", "芜湖市");
        cpcCodeRegion.put("340300", "蚌埠市");
        cpcCodeRegion.put("340400", "淮南市");
        cpcCodeRegion.put("340500", "马鞍山市");
        cpcCodeRegion.put("340600", "淮北市");
        cpcCodeRegion.put("340700", "铜陵市");
        cpcCodeRegion.put("340800", "安庆市");
        cpcCodeRegion.put("341000", "黄山市");
        cpcCodeRegion.put("341100", "滁州市");
        cpcCodeRegion.put("341200", "阜阳市");
        cpcCodeRegion.put("341300", "宿州市");
        cpcCodeRegion.put("341400", "巢湖市");
        cpcCodeRegion.put("341500", "六安市");
        cpcCodeRegion.put("341600", "亳州市");
        cpcCodeRegion.put("341700", "池州市");
        cpcCodeRegion.put("341800", "宣城市");
        cpcCodeRegion.put("350000", "福建省");
        cpcCodeRegion.put("350100", "福州市");
        cpcCodeRegion.put("350200", "厦门市");
        cpcCodeRegion.put("350300", "莆田市");
        cpcCodeRegion.put("350400", "三明市");
        cpcCodeRegion.put("350500", "泉州市");
        cpcCodeRegion.put("350600", "漳州市");
        cpcCodeRegion.put("350700", "南平市");
        cpcCodeRegion.put("350800", "龙岩市");
        cpcCodeRegion.put("350900", "宁德市");
        cpcCodeRegion.put("360000", "江西省");
        cpcCodeRegion.put("360100", "南昌市");
        cpcCodeRegion.put("360200", "景德镇市");
        cpcCodeRegion.put("360300", "萍乡市");
        cpcCodeRegion.put("360400", "九江市");
        cpcCodeRegion.put("360500", "新余市");
        cpcCodeRegion.put("360600", "鹰潭市");
        cpcCodeRegion.put("360700", "赣州市");
        cpcCodeRegion.put("360800", "吉安市");
        cpcCodeRegion.put("360900", "宜春市");
        cpcCodeRegion.put("361000", "抚州市");
        cpcCodeRegion.put("361100", "上饶市");
        cpcCodeRegion.put("370000", "山东省");
        cpcCodeRegion.put("370100", "济南市");
        cpcCodeRegion.put("370200", "青岛市");
        cpcCodeRegion.put("370300", "淄博市");
        cpcCodeRegion.put("370400", "枣庄市");
        cpcCodeRegion.put("370500", "东营市");
        cpcCodeRegion.put("370600", "烟台市");
        cpcCodeRegion.put("370700", "潍坊市");
        cpcCodeRegion.put("370800", "济宁市");
        cpcCodeRegion.put("370900", "泰安市");
        cpcCodeRegion.put("371000", "威海市");
        cpcCodeRegion.put("371100", "日照市");
        cpcCodeRegion.put("371200", "莱芜市");
        cpcCodeRegion.put("371300", "临沂市");
        cpcCodeRegion.put("371400", "德州市");
        cpcCodeRegion.put("371500", "聊城市");
        cpcCodeRegion.put("371600", "滨州市");
        cpcCodeRegion.put("371700", "菏泽市");
        cpcCodeRegion.put("410000", "河南省");
        cpcCodeRegion.put("410100", "郑州市");
        cpcCodeRegion.put("410200", "开封市");
        cpcCodeRegion.put("410300", "洛阳市");
        cpcCodeRegion.put("410400", "平顶山市");
        cpcCodeRegion.put("410500", "安阳市");
        cpcCodeRegion.put("410600", "鹤壁市");
        cpcCodeRegion.put("410700", "新乡市");
        cpcCodeRegion.put("410800", "焦作市");
        cpcCodeRegion.put("410900", "濮阳市");
        cpcCodeRegion.put("411000", "许昌市");
        cpcCodeRegion.put("411100", "漯河市");
        cpcCodeRegion.put("411200", "三门峡市");
        cpcCodeRegion.put("411300", "南阳市");
        cpcCodeRegion.put("411400", "商丘市");
        cpcCodeRegion.put("411500", "信阳市");
        cpcCodeRegion.put("411600", "周口市");
        cpcCodeRegion.put("411700", "驻马店市");
        cpcCodeRegion.put("420000", "湖北省");
        cpcCodeRegion.put("420100", "武汉市");
        cpcCodeRegion.put("420200", "黄石市");
        cpcCodeRegion.put("420300", "十堰市");
        cpcCodeRegion.put("420500", "宜昌市");
        cpcCodeRegion.put("420600", "襄樊市");
        cpcCodeRegion.put("420700", "鄂州市");
        cpcCodeRegion.put("420800", "荆门市");
        cpcCodeRegion.put("420900", "孝感市");
        cpcCodeRegion.put("421000", "荆州市");
        cpcCodeRegion.put("421100", "黄冈市");
        cpcCodeRegion.put("421200", "咸宁市");
        cpcCodeRegion.put("421300", "随州市");
        cpcCodeRegion.put("422800", "恩施土家族苗族自治州");
        cpcCodeRegion.put("429000", "省直辖行政单位");
        cpcCodeRegion.put("430000", "湖南省");
        cpcCodeRegion.put("430100", "长沙市");
        cpcCodeRegion.put("430200", "株洲市");
        cpcCodeRegion.put("430300", "湘潭市");
        cpcCodeRegion.put("430400", "衡阳市");
        cpcCodeRegion.put("430500", "邵阳市");
        cpcCodeRegion.put("430600", "岳阳市");
        cpcCodeRegion.put("430700", "常德市");
        cpcCodeRegion.put("430800", "张家界市");
        cpcCodeRegion.put("430900", "益阳市");
        cpcCodeRegion.put("431000", "郴州市");
        cpcCodeRegion.put("431100", "永州市");
        cpcCodeRegion.put("431200", "怀化市");
        cpcCodeRegion.put("431300", "娄底市");
        cpcCodeRegion.put("433100", "湘西土家族苗族自治州");
        cpcCodeRegion.put("440000", "广东省");
        cpcCodeRegion.put("440100", "广州市");
        cpcCodeRegion.put("440200", "韶关市");
        cpcCodeRegion.put("440300", "深圳市");
        cpcCodeRegion.put("440400", "珠海市");
        cpcCodeRegion.put("440500", "汕头市");
        cpcCodeRegion.put("440600", "佛山市");
        cpcCodeRegion.put("440700", "江门市");
        cpcCodeRegion.put("440800", "湛江市");
        cpcCodeRegion.put("440900", "茂名市");
        cpcCodeRegion.put("441200", "肇庆市");
        cpcCodeRegion.put("441300", "惠州市");
        cpcCodeRegion.put("441400", "梅州市");
        cpcCodeRegion.put("441500", "汕尾市");
        cpcCodeRegion.put("441600", "河源市");
        cpcCodeRegion.put("441700", "阳江市");
        cpcCodeRegion.put("441800", "清远市");
        cpcCodeRegion.put("441900", "东莞市");
        cpcCodeRegion.put("442000", "中山市");
        cpcCodeRegion.put("445100", "潮州市");
        cpcCodeRegion.put("445200", "揭阳市");
        cpcCodeRegion.put("445300", "云浮市");
        cpcCodeRegion.put("450000", "广西壮族自治区");
        cpcCodeRegion.put("450100", "南宁市");
        cpcCodeRegion.put("450200", "柳州市");
        cpcCodeRegion.put("450300", "桂林市");
        cpcCodeRegion.put("450400", "梧州市");
        cpcCodeRegion.put("450500", "北海市");
        cpcCodeRegion.put("450600", "防城港市");
        cpcCodeRegion.put("450700", "钦州市");
        cpcCodeRegion.put("450800", "贵港市");
        cpcCodeRegion.put("450900", "玉林市");
        cpcCodeRegion.put("451000", "百色市");
        cpcCodeRegion.put("451100", "贺州市");
        cpcCodeRegion.put("451200", "河池市");
        cpcCodeRegion.put("451300", "来宾市");
        cpcCodeRegion.put("451400", "崇左市");
        cpcCodeRegion.put("460000", "海南省");
        cpcCodeRegion.put("460100", "海口市");
        cpcCodeRegion.put("460200", "三亚市");
        cpcCodeRegion.put("469000", "省直辖县级行政单位");
        cpcCodeRegion.put("500000", "重庆市");
        cpcCodeRegion.put("500101", "万州区");
        cpcCodeRegion.put("500102", "涪陵区");
        cpcCodeRegion.put("500103", "渝中区");
        cpcCodeRegion.put("500104", "大渡口区");
        cpcCodeRegion.put("500105", "江北区");
        cpcCodeRegion.put("500106", "沙坪坝区");
        cpcCodeRegion.put("500107", "九龙坡区");
        cpcCodeRegion.put("500108", "南岸区");
        cpcCodeRegion.put("500109", "北碚区");
        cpcCodeRegion.put("500110", "万盛区");
        cpcCodeRegion.put("500111", "双桥区");
        cpcCodeRegion.put("500112", "渝北区");
        cpcCodeRegion.put("500113", "巴南区");
        cpcCodeRegion.put("500114", "黔江区");
        cpcCodeRegion.put("500115", "长寿区");
        cpcCodeRegion.put("500222", "綦江县");
        cpcCodeRegion.put("500223", "潼南县");
        cpcCodeRegion.put("500224", "铜梁县");
        cpcCodeRegion.put("500225", "大足县");
        cpcCodeRegion.put("500226", "荣昌县");
        cpcCodeRegion.put("500227", "壁山县");
        cpcCodeRegion.put("500228", "梁平县");
        cpcCodeRegion.put("500229", "城口县");
        cpcCodeRegion.put("500230", "丰都县");
        cpcCodeRegion.put("500231", "垫江县");
        cpcCodeRegion.put("500232", "武隆县");
        cpcCodeRegion.put("500233", "忠县");
        cpcCodeRegion.put("500234", "开县");
        cpcCodeRegion.put("500235", "云阳县");
        cpcCodeRegion.put("500236", "奉节县");
        cpcCodeRegion.put("500237", "巫山县");
        cpcCodeRegion.put("500238", "巫溪县");
        cpcCodeRegion.put("500240", "石柱土家族自治县");
        cpcCodeRegion.put("500241", "秀山土家族苗族自治县");
        cpcCodeRegion.put("500242", "酉阳土家族苗族自治县");
        cpcCodeRegion.put("500243", "彭水苗族土家族自治县");
        cpcCodeRegion.put("510000", "四川省");
        cpcCodeRegion.put("510100", "成都市");
        cpcCodeRegion.put("510300", "自贡市");
        cpcCodeRegion.put("510400", "攀枝花市");
        cpcCodeRegion.put("510500", "泸州市");
        cpcCodeRegion.put("510600", "德阳市");
        cpcCodeRegion.put("510700", "绵阳市");
        cpcCodeRegion.put("510800", "广元市");
        cpcCodeRegion.put("510900", "遂宁市");
        cpcCodeRegion.put("511000", "内江市");
        cpcCodeRegion.put("511100", "乐山市");
        cpcCodeRegion.put("511300", "南充市");
        cpcCodeRegion.put("511400", "眉山市");
        cpcCodeRegion.put("511500", "宜宾市");
        cpcCodeRegion.put("511600", "广安市");
        cpcCodeRegion.put("511700", "达州市");
        cpcCodeRegion.put("511800", "雅安市");
        cpcCodeRegion.put("511900", "巴中市");
        cpcCodeRegion.put("512000", "资阳市");
        cpcCodeRegion.put("513200", "阿坝藏族羌族自治州");
        cpcCodeRegion.put("513300", "甘孜藏族自治州");
        cpcCodeRegion.put("513400", "凉山彝族自治州");
        cpcCodeRegion.put("520000", "贵州省");
        cpcCodeRegion.put("520100", "贵阳市");
        cpcCodeRegion.put("520200", "六盘水市");
        cpcCodeRegion.put("520300", "遵义市");
        cpcCodeRegion.put("520400", "安顺市");
        cpcCodeRegion.put("522200", "铜仁地区");
        cpcCodeRegion.put("522300", "黔西南布依族苗族自治州");
        cpcCodeRegion.put("522400", "毕节地区");
        cpcCodeRegion.put("522600", "黔东南苗族侗族自治州");
        cpcCodeRegion.put("522700", "黔南布依族苗族自治州");
        cpcCodeRegion.put("530000", "云南省");
        cpcCodeRegion.put("530100", "昆明市");
        cpcCodeRegion.put("530300", "曲靖市");
        cpcCodeRegion.put("530400", "玉溪市");
        cpcCodeRegion.put("530500", "保山市");
        cpcCodeRegion.put("530600", "昭通市");
        cpcCodeRegion.put("530700", "丽江市");
        cpcCodeRegion.put("530800", "思茅市");
        cpcCodeRegion.put("530900", "临沧市");
        cpcCodeRegion.put("532300", "楚雄彝族自治州");
        cpcCodeRegion.put("532500", "红河哈尼族彝族自治州");
        cpcCodeRegion.put("532600", "文山壮族苗族自治州");
        cpcCodeRegion.put("532800", "西双版纳傣族自治州");
        cpcCodeRegion.put("532900", "大理白族自治州");
        cpcCodeRegion.put("533100", "德宏傣族景颇族自治州");
        cpcCodeRegion.put("533300", "怒江傈僳族自治州");
        cpcCodeRegion.put("533400", "迪庆藏族自治州");
        cpcCodeRegion.put("540000", "西藏自治区");
        cpcCodeRegion.put("540100", "拉萨市");
        cpcCodeRegion.put("542100", "昌都地区");
        cpcCodeRegion.put("542200", "山南地区");
        cpcCodeRegion.put("542300", "日喀则地区");
        cpcCodeRegion.put("542400", "那曲地区");
        cpcCodeRegion.put("542500", "阿里地区");
        cpcCodeRegion.put("542600", "林芝地区");
        cpcCodeRegion.put("610000", "陕西省");
        cpcCodeRegion.put("610100", "西安市");
        cpcCodeRegion.put("610200", "铜川市");
        cpcCodeRegion.put("610300", "宝鸡市");
        cpcCodeRegion.put("610400", "咸阳市");
        cpcCodeRegion.put("610500", "渭南市");
        cpcCodeRegion.put("610600", "延安市");
        cpcCodeRegion.put("610700", "汉中市");
        cpcCodeRegion.put("610800", "榆林市");
        cpcCodeRegion.put("610900", "安康市");
        cpcCodeRegion.put("611000", "商洛市");
        cpcCodeRegion.put("620000", "甘肃省");
        cpcCodeRegion.put("620100", "兰州市");
        cpcCodeRegion.put("620200", "嘉峪关市");
        cpcCodeRegion.put("620300", "金昌市");
        cpcCodeRegion.put("620400", "白银市");
        cpcCodeRegion.put("620500", "天水市");
        cpcCodeRegion.put("620600", "武威市");
        cpcCodeRegion.put("620700", "张掖市");
        cpcCodeRegion.put("620800", "平凉市");
        cpcCodeRegion.put("620900", "酒泉市");
        cpcCodeRegion.put("621000", "庆阳市");
        cpcCodeRegion.put("621100", "定西市");
        cpcCodeRegion.put("621200", "陇南市");
        cpcCodeRegion.put("622900", "临夏回族自治州");
        cpcCodeRegion.put("623000", "甘南藏族自治州");
        cpcCodeRegion.put("630000", "青海省");
        cpcCodeRegion.put("630100", "西宁市");
        cpcCodeRegion.put("632100", "海东地区");
        cpcCodeRegion.put("632200", "海北藏族自治州");
        cpcCodeRegion.put("632300", "黄南藏族自治州");
        cpcCodeRegion.put("632500", "海南藏族自治州");
        cpcCodeRegion.put("632600", "果洛藏族自治州");
        cpcCodeRegion.put("632700", "玉树藏族自治州");
        cpcCodeRegion.put("632800", "海西蒙古族藏族自治州");
        cpcCodeRegion.put("640000", "宁夏回族自治区");
        cpcCodeRegion.put("640100", "银川市");
        cpcCodeRegion.put("640200", "石嘴山市");
        cpcCodeRegion.put("640300", "吴忠市");
        cpcCodeRegion.put("640400", "固原市");
        cpcCodeRegion.put("640500", "中卫市");
        cpcCodeRegion.put("650000", "新疆维吾尔自治区");
        cpcCodeRegion.put("650100", "乌鲁木齐市");
        cpcCodeRegion.put("650200", "克拉玛依市");
        cpcCodeRegion.put("652100", "吐鲁番地区");
        cpcCodeRegion.put("652200", "哈密地区");
        cpcCodeRegion.put("652300", "昌吉回族自治州");
        cpcCodeRegion.put("652700", "博尔塔拉蒙古自治州");
        cpcCodeRegion.put("652800", "巴音郭楞蒙古自治州");
        cpcCodeRegion.put("652900", "阿克苏地区");
        cpcCodeRegion.put("653000", "克孜勒苏柯尔克孜自治州");
        cpcCodeRegion.put("653100", "喀什地区");
        cpcCodeRegion.put("653200", "和田地区");
        cpcCodeRegion.put("654000", "伊犁哈萨克自治州");
        cpcCodeRegion.put("654200", "塔城地区");
        cpcCodeRegion.put("654300", "阿勒泰地区");
        cpcCodeRegion.put("659000", "省直辖行政单位");
        cpcCodeRegion.put("710000", "台湾省");
        cpcCodeRegion.put("810000", "香港特别行政区");
        cpcCodeRegion.put("910000", "澳门特别行政区");
    }

    public static String[] getCityCode(String city) {
        String provinceArea = null;
        String cityArea = null;
        if (city.matches("^(北京[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(朝阳)$")) {
            provinceArea = "北京市";
            cityArea = city.replaceAll("^(北京[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(朝阳)$", "$2");
            cityArea = provinceArea + cityArea;
        }
        if (city.matches("^((北京[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((((东城|西城|崇文|宣武|丰台|石景山|海淀|门头沟|房山|通州|顺义|昌平|怀柔|平谷|大兴)[区]?)|((密云|延庆)[县]?))|(朝阳区))$")) {
            provinceArea = "北京市";
            cityArea = city.replaceAll("^((北京[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((((东城|西城|崇文|宣武|丰台|石景山|海淀|门头沟|房山|通州|顺义|昌平|怀柔|平谷|大兴)[区]?)|((密云|延庆)[县]?))|(朝阳区))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("区", "").replace("县", "");
        }

        if (city.matches("^(天津[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(河北)$")) {
            provinceArea = "天津市";
            cityArea = city.replaceAll("^(天津[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(河北)$", "$2");
            cityArea = provinceArea + cityArea;
        }
        if (city.matches("^((天津[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((((和平|河东|河西|南开|红桥|塘沽|汉沽|大港|东丽|西青|津南|北辰|武清|宝坻)[区]?)|((宁河|静海|蓟)[县]?))|(河北区)|(滨海(新区|区)?))$")) {
            provinceArea = "天津市";
            cityArea = city.replaceAll("^((天津[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((((和平|河东|河西|南开|红桥|塘沽|汉沽|大港|东丽|西青|津南|北辰|武清|宝坻)[区]?)|((宁河|静海|蓟)[县]?))|(河北区)|(滨海(新区|区)?))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("新区", "").replace("县", "").replace("区", "");
        }

        if (city.matches("^((河北[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((石家庄|唐山|秦皇岛|邯郸|邢台|保定|张家口|承德|沧州|廊坊|衡水)[市]?)$")) {
            provinceArea = "河北省";
            cityArea = city.replaceAll("^((河北[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((石家庄|唐山|秦皇岛|邯郸|邢台|保定|张家口|承德|沧州|廊坊|衡水)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((山西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((太原|大同|阳泉|长治|晋城|朔州|晋中|运城|忻州|临汾|吕梁)[市]?)$")) {
            provinceArea = "山西省";
            cityArea = city.replaceAll("^((山西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((太原|大同|阳泉|长治|晋城|朔州|晋中|运城|忻州|临汾|吕梁)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((内蒙古(自治区)?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((呼和浩特|包头|乌海|赤峰|通辽|鄂尔多斯|呼伦贝尔|巴彦淖尔|乌兰察布)[市]?)|((兴安|锡林郭勒|阿拉善)[盟]?))$")) {
            provinceArea = "内蒙古";
            cityArea = city.replaceAll("^((内蒙古(自治区)?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((呼和浩特|包头|乌海|赤峰|通辽|鄂尔多斯|呼伦贝尔|巴彦淖尔|乌兰察布)[市]?)|((兴安|锡林郭勒|阿拉善)[盟]?))$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("盟", "");
        }

        if (city.matches("^(辽宁[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(朝阳)$")) {
            provinceArea = "辽宁省";
            cityArea = city.replaceAll("^(辽宁[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(朝阳)$", "$2");
            cityArea = provinceArea + cityArea;
        }
        if (city.matches("^((辽宁[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((沈阳|大连|鞍山|抚顺|本溪|丹东|锦州|营口|阜新|辽阳|盘锦|铁岭|葫芦岛)[市]?)|(朝阳市))$")) {
            provinceArea = "辽宁省";
            cityArea = city.replaceAll("^((辽宁[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((沈阳|大连|鞍山|抚顺|本溪|丹东|锦州|营口|阜新|辽阳|盘锦|铁岭|葫芦岛)[市]?)|(朝阳市))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((吉林[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((长春|吉林|四平|辽源|通化|白山|松原|白城)[市]?)|(延边|延边朝鲜|延边朝鲜族|延边朝鲜族自治州))$")) {
            provinceArea = "吉林省";
            cityArea = city.replaceAll("^((吉林[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((长春|吉林|四平|辽源|通化|白山|松原|白城)[市]?)|(延边|延边朝鲜|延边朝鲜族|延边朝鲜族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("族", "").replace("朝鲜", "");
        }

        if (city.matches("^((黑龙江[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((哈尔滨|齐齐哈尔|鸡西|鹤岗|双鸭山|大庆|伊春|佳木斯|七台河|牡丹江|黑河|绥化)[市]?)|(大兴安岭|大兴安岭地区))$")) {
            provinceArea = "黑龙江省";
            cityArea = city.replaceAll("^((黑龙江[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((哈尔滨|齐齐哈尔|鸡西|鹤岗|双鸭山|大庆|伊春|佳木斯|七台河|牡丹江|黑河|绥化)[市]?)|(大兴安岭|大兴安岭地区))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("地区", "");
        }

        if (city.matches("^((上海[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((黄浦|卢湾|徐汇|长宁|静安|普陀|闸北|虹口|杨浦|闵行|宝山|嘉定|金山|松江|青浦|南汇|奉贤)[区]?)|(浦东(新区|区)?)|(崇明(县)?))$")) {
            provinceArea = "上海市";
            cityArea = city.replaceAll("^((上海[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((黄浦|卢湾|徐汇|长宁|静安|普陀|闸北|虹口|杨浦|闵行|宝山|嘉定|金山|松江|青浦|南汇|奉贤)[区]?)|(浦东(新区|区)?)|(崇明(县)?))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("新区", "").replace("区", "").replace("县", "");
        }

        if (city.matches("^((江苏[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南京|无锡|徐州|常州|苏州|南通|连云港|淮安|盐城|扬州|镇江|泰州|宿迁)[市]?)$")) {
            provinceArea = "江苏省";
            cityArea = city.replaceAll("^((江苏[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南京|无锡|徐州|常州|苏州|南通|连云港|淮安|盐城|扬州|镇江|泰州|宿迁)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((浙江[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((杭州|宁波|温州|嘉兴|湖州|绍兴|金华|衢州|舟山|台州|丽水)[市]?)$")) {
            provinceArea = "浙江省";
            cityArea = city.replaceAll("^((浙江[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((杭州|宁波|温州|嘉兴|湖州|绍兴|金华|衢州|舟山|台州|丽水)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((安徽[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((合肥|芜湖|蚌埠|淮南|马鞍山|淮北|铜陵|安庆|黄山|滁州|阜阳|宿州|巢湖|六安|亳州|池州|宣城)[市]?)$")) {
            provinceArea = "安徽省";
            cityArea = city.replaceAll("^((安徽[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((合肥|芜湖|蚌埠|淮南|马鞍山|淮北|铜陵|安庆|黄山|滁州|阜阳|宿州|巢湖|六安|亳州|池州|宣城)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((福建[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((福州|厦门|莆田|三明|泉州|漳州|南平|龙岩|宁德)[市]?)$")) {
            provinceArea = "福建省";
            cityArea = city.replaceAll("^((福建[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((福州|厦门|莆田|三明|泉州|漳州|南平|龙岩|宁德)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((江西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南昌|景德镇|萍乡|九江|新余|鹰潭|赣州|吉安|宜春|抚州|上饶)[市]?)$")) {
            provinceArea = "江西省";
            cityArea = city.replaceAll("^((江西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南昌|景德镇|萍乡|九江|新余|鹰潭|赣州|吉安|宜春|抚州|上饶)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((山东[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((济南|青岛|淄博|枣庄|东营|烟台|潍坊|济宁|泰安|威海|日照|莱芜|临沂|德州|聊城|滨州|菏泽)[市]?)$")) {
            provinceArea = "山东省";
            cityArea = city.replaceAll("^((山东[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((济南|青岛|淄博|枣庄|东营|烟台|潍坊|济宁|泰安|威海|日照|莱芜|临沂|德州|聊城|滨州|菏泽)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((河南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((郑州|开封|洛阳|平顶山|安阳|鹤壁|新乡|焦作|濮阳|许昌|漯河|三门峡|南阳|商丘|信阳|周口|驻马店)[市]?)$")) {
            provinceArea = "河南省";
            cityArea = city.replaceAll("^((河南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((郑州|开封|洛阳|平顶山|安阳|鹤壁|新乡|焦作|濮阳|许昌|漯河|三门峡|南阳|商丘|信阳|周口|驻马店)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^(湖北[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?省直辖行政单位)$")) {
            provinceArea = "湖北省";
            cityArea = "湖北省省直辖行政单位";
        }
        if (city.matches("^((湖北[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((武汉|黄石|十堰|宜昌|襄樊|鄂州|荆门|孝感|荆州|黄冈|咸宁|随州)[市]?)|(恩施|恩施土家|恩施土家族|恩施土家族苗族自治州))$")) {
            provinceArea = "湖北省";
            cityArea = city.replaceAll("^((湖北[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((武汉|黄石|十堰|宜昌|襄樊|鄂州|荆门|孝感|荆州|黄冈|咸宁|随州)[市]?)|(恩施|恩施土家|恩施土家族|恩施土家族苗族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("苗族自治州", "").replace("族", "").replace("土家", "");
        }

        if (city.matches("^((湖南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((长沙|株洲|湘潭|衡阳|邵阳|岳阳|常德|张家界|益阳|郴州|永州|怀化|娄底)[市]?)|(湘西|湘西土家|湘西土家族|湘西土家族苗族自治州))$")) {
            provinceArea = "湖南省";
            cityArea = city.replaceAll("^((湖南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((长沙|株洲|湘潭|衡阳|邵阳|岳阳|常德|张家界|益阳|郴州|永州|怀化|娄底)[市]?)|(湘西|湘西土家|湘西土家族|湘西土家族苗族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("苗族自治州", "").replace("族", "").replace("土家", "");
        }

        if (city.matches("^((广东[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((广州|韶关|深圳|珠海|汕头|佛山|江门|湛江|茂名|肇庆|惠州|梅州|汕尾|河源|阳江|清远|东莞|中山|潮州|揭阳|云浮)[市]?)$")) {
            provinceArea = "广东省";
            cityArea = city.replaceAll("^((广东[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((广州|韶关|深圳|珠海|汕头|佛山|江门|湛江|茂名|肇庆|惠州|梅州|汕尾|河源|阳江|清远|东莞|中山|潮州|揭阳|云浮)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^(((广西|广西壮族|广西壮族自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南宁|柳州|桂林|梧州|北海|防城港|钦州|贵港|玉林|百色|贺州|河池|来宾|崇左)[市]?)$")) {
            provinceArea = "广西";
            cityArea = city.replaceAll("^(((广西|广西壮族|广西壮族自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((南宁|柳州|桂林|梧州|北海|防城港|钦州|贵港|玉林|百色|贺州|河池|来宾|崇左)[市]?)$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^(海南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?省直辖县级行政单位)$")) {
            provinceArea = "海南省";
            cityArea = "海南省省直辖县级行政单位";
        }

        if (city.matches("^((海南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((海口|三亚)[市]?)$")) {
            provinceArea = "海南省";
            cityArea = city.replaceAll("^((海南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((海口|三亚)[市]?)$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((重庆[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((万州|涪陵|渝中|大渡口|江北|沙坪坝|九龙坡|南岸|北碚|万盛|双桥|渝北|巴南|黔江|长寿)[区]?)|((綦江|潼南|铜梁|大足|荣昌|壁山|梁平|城口|丰都|垫江|武隆|忠|开|云阳|奉节|巫山|巫溪)[县]?)|(石柱|石柱土家族|石柱土家族自治县)|(秀山|秀山土家族|秀山土家族苗族自治县)|(酉阳|酉阳土家族|酉阳土家族苗族自治县)|(彭水|彭水苗族|彭水苗族土家族|彭水苗族土家族自治县))$")) {
            provinceArea = "重庆市";
            cityArea = city.replaceAll("^((重庆[市]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((万州|涪陵|渝中|大渡口|江北|沙坪坝|九龙坡|南岸|北碚|万盛|双桥|渝北|巴南|黔江|长寿)[区]?)|((綦江|潼南|铜梁|大足|荣昌|壁山|梁平|城口|丰都|垫江|武隆|忠|开|云阳|奉节|巫山|巫溪)[县]?)|(石柱|石柱土家族|石柱土家族自治县)|(秀山|秀山土家族|秀山土家族苗族自治县)|(酉阳|酉阳土家族|酉阳土家族苗族自治县)|(彭水|彭水苗族|彭水苗族土家族|彭水苗族土家族自治县))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("区", "").replace("自治县", "").replace("县", "").replace("苗族", "").replace("土家族", "");
        }

        if (city.matches("^((四川[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((成都|自贡|攀枝花|泸州|德阳|绵阳|广元|遂宁|内江|乐山|南充|眉山|宜宾|广安|达州|雅安|巴中|资阳)[市]?)|(阿坝|阿坝藏族|阿坝藏族羌族|阿坝藏族羌族自治州)|(甘孜|甘孜藏族|甘孜藏族自治州)|(凉山|凉山彝族|凉山彝族自治州))$")) {
            provinceArea = "四川省";
            cityArea = city.replaceAll("^((四川[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((成都|自贡|攀枝花|泸州|德阳|绵阳|广元|遂宁|内江|乐山|南充|眉山|宜宾|广安|达州|雅安|巴中|资阳)[市]?)|(阿坝|阿坝藏族|阿坝藏族羌族|阿坝藏族羌族自治州)|(甘孜|甘孜藏族|甘孜藏族自治州)|(凉山|凉山彝族|凉山彝族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("羌族", "").replace("藏族", "").replace("彝族", "");
        }

        if (city.matches("^((贵州[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((贵阳|六盘水|遵义|安顺)[市]?)|(铜仁|铜仁地区)|(毕节|毕节地区)|(黔西南|黔西南布依族|黔西南布依族苗族|黔西南布依族苗族自治州)|(黔东南|黔东南苗族|黔东南苗族侗族|黔东南苗族侗族自治州)|(黔南|黔南布依族|黔南布依族苗族|黔南布依族苗族自治州))$")) {
            provinceArea = "贵州省";
            cityArea = city.replaceAll("^((贵州[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((贵阳|六盘水|遵义|安顺)[市]?)|(铜仁|铜仁地区)|(毕节|毕节地区)|(黔西南|黔西南布依族|黔西南布依族苗族|黔西南布依族苗族自治州)|(黔东南|黔东南苗族|黔东南苗族侗族|黔东南苗族侗族自治州)|(黔南|黔南布依族|黔南布依族苗族|黔南布依族苗族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("侗族", "").replace("苗族", "").replace("布依族", "").replace("地区", "");
        }

        if (city.matches("^((云南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((昆明|曲靖|玉溪|保山|昭通|丽江|思茅|临沧)[市]?)|(楚雄|楚雄彝族|楚雄彝族自治州)|(红河|红河哈尼族|红河哈尼族彝族|红河哈尼族彝族自治州)|(文山|文山壮族|文山壮族苗族|文山壮族苗族自治州)|(西双版纳|西双版纳傣族|西双版纳傣族自治州)|(大理|大理白族|大理白族自治州)|(德宏|德宏傣族|德宏傣族景颇族|德宏傣族景颇族自治州)|(怒江|怒江傈僳族|怒江傈僳族自治州)|(迪庆|迪庆藏族|迪庆藏族自治州))$")) {
            provinceArea = "云南省";
            cityArea = city.replaceAll("^((云南[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((昆明|曲靖|玉溪|保山|昭通|丽江|思茅|临沧)[市]?)|(楚雄|楚雄彝族|楚雄彝族自治州)|(红河|红河哈尼族|红河哈尼族彝族|红河哈尼族彝族自治州)|(文山|文山壮族|文山壮族苗族|文山壮族苗族自治州)|(西双版纳|西双版纳傣族|西双版纳傣族自治州)|(大理|大理白族|大理白族自治州)|(德宏|德宏傣族|德宏傣族景颇族|德宏傣族景颇族自治州)|(怒江|怒江傈僳族|怒江傈僳族自治州)|(迪庆|迪庆藏族|迪庆藏族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("彝族", "").replace("景颇族", "").replace("哈尼族", "").replace("苗族", "").replace("傣族", "").replace("白族", "").replace("傈僳族", "").replace("藏族", "").replace("壮族", "");
        }

        if (city.matches("^(((西藏|西藏自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((拉萨)[市]?)|((昌都|山南|日喀则|那曲|阿里|林芝)(地区)?))$")) {
            provinceArea = "西藏";
            cityArea = city.replaceAll("^(((西藏|西藏自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((拉萨)[市]?)|((昌都|山南|日喀则|那曲|阿里|林芝)(地区)?))$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("地区", "");
        }

        if (city.matches("^((陕西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((西安|铜川|宝鸡|咸阳|渭南|延安|汉中|榆林|安康|商洛)[市]?))$")) {
            provinceArea = "陕西省";
            cityArea = city.replaceAll("^((陕西[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((西安|铜川|宝鸡|咸阳|渭南|延安|汉中|榆林|安康|商洛)[市]?))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^((甘肃[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((兰州|嘉峪关|金昌|白银|天水|武威|张掖|平凉|酒泉|庆阳|定西|陇南)[市]?)|(临夏|临夏回族|临夏回族自治州)|(甘南|甘南藏族|甘南藏族自治州))$")) {
            provinceArea = "甘肃省";
            cityArea = city.replaceAll("^((甘肃[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((兰州|嘉峪关|金昌|白银|天水|武威|张掖|平凉|酒泉|庆阳|定西|陇南)[市]?)|(临夏|临夏回族|临夏回族自治州)|(甘南|甘南藏族|甘南藏族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("回族", "").replace("藏族", "");
        }

        if (city.matches("^(青海[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(海南|海南藏族|海南藏族自治州)$")) {
            provinceArea = "青海省";
            cityArea = city.replaceAll("^(青海[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)(海南|海南藏族|海南藏族自治州)$", "$2");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("自治州", "").replace("藏族", "");
        }
        if (city.matches("^((青海[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((西宁)[市]?)|((海东)(地区)?)|(海北|海北藏族|海北藏族自治州)|(黄南|黄南藏族|黄南藏族自治州)|(果洛|果洛藏族|果洛藏族自治州)|(玉树|玉树藏族|玉树藏族自治州)|(海西|海西蒙古族|海西蒙古族藏族|海西蒙古族藏族自治州)|(海南藏族|海南藏族自治州))$")) {
            provinceArea = "青海省";
            cityArea = city.replaceAll("^((青海[省]?[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((西宁)[市]?)|((海东)(地区)?)|(海北|海北藏族|海北藏族自治州)|(黄南|黄南藏族|黄南藏族自治州)|(果洛|果洛藏族|果洛藏族自治州)|(玉树|玉树藏族|玉树藏族自治州)|(海西|海西蒙古族|海西蒙古族藏族|海西蒙古族藏族自治州)|(海南藏族|海南藏族自治州))$", "$3");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("自治州", "").replace("地区", "").replace("蒙古族", "").replace("藏族", "");
        }

        if (city.matches("^(((宁夏|宁夏回族|宁夏回族自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((银川|石嘴山|吴忠|固原|中卫)[市]?))$")) {
            provinceArea = "宁夏";
            cityArea = city.replaceAll("^(((宁夏|宁夏回族|宁夏回族自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((银川|石嘴山|吴忠|固原|中卫)[市]?))$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "");
        }

        if (city.matches("^(新疆[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?省直辖行政单位|新疆维吾尔[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?省直辖行政单位|新疆维吾尔自治区[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?省直辖行政单位)$")) {
            provinceArea = "新疆";
            cityArea = "新疆省直辖行政单位";
        }
        if (city.matches("^(((新疆|新疆维吾尔|新疆维吾尔自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((乌鲁木齐|克拉玛依)[市]?)|((吐鲁番|哈密|阿克苏|喀什|和田|塔城|阿勒泰)(地区)?))$")) {
            provinceArea = "新疆";
            cityArea = city.replaceAll("^(((新疆|新疆维吾尔|新疆维吾尔自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)(((乌鲁木齐|克拉玛依)[市]?)|((吐鲁番|哈密|阿克苏|喀什|和田|塔城|阿勒泰)(地区)?))$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("市", "").replace("地区", "");
        }
        if (city.matches("^(((新疆|新疆维吾尔|新疆维吾尔自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((昌吉|昌吉回族|昌吉回族自治州)|(博尔塔拉|博尔塔拉蒙古|博尔塔拉蒙古自治州)|(巴音郭楞|巴音郭楞蒙古|巴音郭楞蒙古自治州)|(克孜勒苏|克孜勒苏柯尔克孜|克孜勒苏柯尔克孜自治州)|(伊犁|伊犁哈萨克|伊犁哈萨克自治州))$")) {
            provinceArea = "新疆";
            cityArea = city.replaceAll("^(((新疆|新疆维吾尔|新疆维吾尔自治区)[\\u3000\\u0020\\u002c\\uff0c\\u002d\\uff0d]?)?)((昌吉|昌吉回族|昌吉回族自治州)|(博尔塔拉|博尔塔拉蒙古|博尔塔拉蒙古自治州)|(巴音郭楞|巴音郭楞蒙古|巴音郭楞蒙古自治州)|(克孜勒苏|克孜勒苏柯尔克孜|克孜勒苏柯尔克孜自治州)|(伊犁|伊犁哈萨克|伊犁哈萨克自治州))$", "$4");
            cityArea = provinceArea + cityArea;
            cityArea = cityArea.replace("蒙古", "").replace("自治州", "").replace("回族", "").replace("柯尔克孜", "").replace("哈萨克", "");
        }

        if (city.matches("^(台湾(省)?)$")) {
            provinceArea = "台湾省";
            cityArea = null;
        }
        if (city.matches("^(香港(特别行政区)?)$")) {
            provinceArea = "香港";
            cityArea = null;
        }
        if (city.matches("^(澳门(特别行政区)?)$")) {
            provinceArea = "澳门";
            cityArea = null;
        }
        String[] result = new String[2];
        result[0] = provinceArea;
        result[1] = cityArea;
        return result;
    }

    public static void main(String[] args) {
        // 排序显示cpcRegion----------------------------------------------------------------------------------------begin
        // 将map.entrySet()转换成list
        List<Map.Entry<String, String>> list = new ArrayList<Map.Entry<String, String>>(cpcRegion.entrySet());
        // 通过比较器来实现排序
        Collections.sort(list, new Comparator<Map.Entry<String, String>>() {
            @Override
            public int compare(Map.Entry<String, String> o1, Map.Entry<String, String> o2) {
                // 升序排序
                return o1.getValue().compareTo(o2.getValue());
            }
        });
        for (Map.Entry<String, String> mapping : list) {
            System.out.println(mapping.getValue());
        }
        // 排序显示cpcRegion----------------------------------------------------------------------------------------end
    }
}
